<div class="<%= card_class %> card__highlight">
  <div class="card__highlight-text md:w-[70%] p-0">
    <%= link_to resource_path, class: "p-4" do %>
      <h3 class="h3 text-secondary inline-block align-middle">
        <%= decidim_escape_translated(title) %>
      </h3>
      <% if voted? %>
        <div class="float-right">
          <%= icon "check-double-line", class: "inline-block align-middle fill-success ml-2 h-[1.5em] w-[1.5em]" %>
          <span class="text-success font-bold"><%= t("completed", scope: "decidim.budgets.budgets_list") %></span>
        </div>
      <% end %>
      <% if progress? %>
        <div class="float-right">
          <%= icon "progress-2-line", class: "inline-block align-middle fill-warning ml-2 h-[1.5em] w-[1.5em]" %>
          <span class="text-warning font-bold"><%= t("incomplete", scope: "decidim.budgets.budgets_list") %></span>
        </div>
      <% end %>
      <div class="my-2">
        <%= decidim_sanitize html_truncate(translated_attribute(description), length: 70) %>
      </div>
      <% unless voted? %>
        <div class="divide-x-2 divide-gray-3">
          <%= render :projects_count %>
          <%= render :vote_action if voting_context? %>
        </div>
      <% end %>
    <% end %>
    <% if voted? %>
      <div class="divide-x-2 divide-gray-3 p-4 pt-0">
        <%= render :projects_count %>
        <%= render :vote_action if voting_context? %>
      </div>
    <% end %>
  </div>

  <% if voting_context? %>
    <%= link_to_resource_or_vote("budget__card__highlight-vote") do %>
      <div class="budget__card__highlight-vote__header">
        <span class="budget__card__highlight-vote__number">
          <%= budget_to_currency(total_budget) %>
        </span>
      </div>
      <%= button_tag class: button_class do %>
        <span><%= button_text %></span>
        <%= icon "arrow-right-line" %>
      <% end %>
    <% end %>
  <% end %>
</div>
